package com.bootdo.essential.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.bootdo.common.annotation.Log;
import com.bootdo.essential.domain.EssentialDO;
import com.bootdo.essential.serivce.EssentialService;

/**
 * @Desc 基本信息
 * @date 2019/12/23
 *
 */
@Controller
@RequestMapping("/essential/essential")
public class EssentialController {

    private final String PREFIX = "essential/essential";

    @Autowired
    private EssentialService essentialService;

    @Log("获取基本信息")
    @GetMapping()
    String list(Model model) {
        EssentialDO essential = essentialService.list();
        model.addAttribute("essent", essential);
        return PREFIX + "/list";
    }
}
